-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RO db should allow access to tx.Page(...) thus bbolt pages #371
Conversation
Thanks @ptabor. I was planning to add test cases to cover all the bolt commands in main_test.go, but unfortunately I do not get time to do it so far. Otherwise, I should can discover this issue earlier. Usually we don't need to load freelist at all for the readonly mode. But it's needed in some cases/commands (e.g, Lines 418 to 419 in b654ce9
So I'd suggest to make change something like below,
|
@ahrtr I don't expect getters (and We might emit warning (although we don't have good logging practices in bbolt and just console.log would be very spammy, how to use this properly.... But either we need explicit RO_WITH_FREELIST mode of opening, or |
d62b78f
to
a6f70f9
Compare
I discoved that after change etcd-io#365 the 'bbolt pages' command stopped working. The problem is this check: https://github.com/etcd-io/bbolt/blob/b654ce922133ff49bb385297f30835ca357bac5f/tx.go#L663 that assumes that freepages has been loaded. We can either preload the freepages when opening a RO file: https://github.com/etcd-io/bbolt/blob/b654ce922133ff49bb385297f30835ca357bac5f/db.go#L280-L284 but this would slow-down opening RO files. Thus for now I disable checking whether page is free... Signed-off-by: Piotr Tabor <ptab@google.com>
a6f70f9
to
ac3ef86
Compare
This is a good point.
Can we add a field something like |
Dropping on behalf for: #381 |
I discoved that after change #365 the 'bbolt pages' command stopped working.
The problem is this check:
bbolt/tx.go
Line 663 in b654ce9
We can either preload the freepages when opening a RO file:
bbolt/db.go
Lines 280 to 284 in b654ce9
but this would slow-down opening RO files.
Thus for now I disable checking whether page is free...
Signed-off-by: Piotr Tabor ptab@google.com